package com.zhuifeng.product.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zhuifeng.common.core.annotation.Excel;
import com.zhuifeng.common.core.web.domain.BaseEntity;

import java.util.List;

/**
 * 类型对象 type
 * 
 * @author zhuifeng
 * @date 2022-08-17
 */
public class Type extends BaseEntity
{

    /** 类型id */
    private String typeId;

    /** 父级id */
    @Excel(name = "父级id")
    private String parentId;

    /** 类型名称 */
    @Excel(name = "类型名称")
    private String typeName;

    @Excel(name = "子分类")
    private List<Type> typeList;

    @Excel(name = "排序")
    private Integer typeSort;

    public Integer getTypeSort() {
        return typeSort;
    }

    public void setTypeSort(Integer typeSort) {
        this.typeSort = typeSort;
    }

    public String getTypeName() {
        return typeName;
    }

    public List<Type> getTypeList() {
        return typeList;
    }

    public void setTypeList(List<Type> typeList) {
        this.typeList = typeList;
    }

    public Type() {
    }

    public Type(String typeId, String parentId, String typeName, List<Type> typeList, Integer isDelete) {
        this.typeId = typeId;
        this.parentId = parentId;
        this.typeName = typeName;
        this.typeList = typeList;
        this.isDelete = isDelete;
    }

    /** 0是删除，1是使用 */
    private Integer isDelete;

    public void setTypeId(String typeId)
    {
        this.typeId = typeId;
    }

    public String getTypeId()
    {
        return typeId;
    }
    public void setParentId(String parentId)
    {
        this.parentId = parentId;
    }

    public String getParentId()
    {
        return parentId;
    }
    public void setTypeName(String typeName) 
    {
        this.typeName = typeName;
    }

    public Integer getIsDelete() 
    {
        return isDelete;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("typeId", getTypeId())
            .append("parentId", getParentId())
            .append("isDelete", getIsDelete())
            .toString();
    }
}
